package com.estore.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

import com.estore.entity.Agent_Profile;

public class Agent_ProfileMapper implements RowMapper<Agent_Profile> {

	@Override
	public Agent_Profile mapRow(ResultSet rs, int arg1) throws SQLException {
		Agent_Profile agent_profile = new Agent_Profile();
		agent_profile.setAgentID(rs.getInt("agentID"));
		agent_profile.setUserID(rs.getInt("userID"));
		agent_profile.setAgentName(rs.getString("agentName"));
		agent_profile.setAddress(rs.getString("address"));
		agent_profile.setPhoneNumber(rs.getString("phoneNumber"));
		agent_profile.setAgentEmail(rs.getString("agentEmail"));
		agent_profile.setAgentWebsite(rs.getString("agentWebsite"));
		agent_profile.setStartDate(rs.getString("startDate"));
		agent_profile.setStatus(rs.getString("status"));
		agent_profile.setLogo(rs.getString("logo"));
		return agent_profile;
	}

}
